<template>
  <div class="home">
    <div style="back"><img src="../../assets/images/banner1@3x.png" /></div>
    <div style="padding-top: 2rem">
      <van-form validate-first ref="formDataRef" @submit="onSubmit">
        <div class="title" style="font-size:14px">
          报备证件号：
        </div>
        <van-field
          style="font-size:16px;margin-left: -6px;"
          v-model="formData.cardNo"
          maxlength="18"
          name="报备证件号"
          placeholder="请输入报备证件号"
          :rules="[{ required: true, message: '' }]"
        />
        <div style="height: 1px;background: #f1f1f1;"></div>
        <!-- <div class="title" style="font-size:14px">
          查询码：
        </div>
        <van-field style="border-style: none; font-size:16px;margin-left: -6px;" v-model="formData.queryCode"
          maxlength="6" name="查询码" placeholder="请输入查询码" :rules="[{ required: false, message: '' }]" />
        <div style="height: 1px;background: #f1f1f1;"></div> -->
      </van-form>
    </div>
    <div style="padding-left: 14%; padding-right: 14%; margin-top: 2rem">
      <!-- <van-image
        width="10rem"
        height="10rem"
        fit="cover"
        position="left"
        :src="baseImg"
      /> -->
      <!-- <p style="text-align: center">请将此页面截图，以备查验！</p> -->
    </div>
    <div style="margin-top: 10px;opacity: 0.5;">
      <van-button
        style="border-radius: 44px;"
        block
        type="info"
        @click="onSubmit"
        >报备查询</van-button
      >
    </div>
    <div>
      <div
        style="
              padding-left: 30px;
              background: url('../../assets/images/record-gt.png');
            "
      ></div>
      <!-- <span style=" opacity:0.5; font-size: 0.78rem;width: 100%;">
        &nbsp;<b>温馨提示：</b>
        <p />
        &nbsp;1、2022年5月21日22点前已报备人员查询码为：<span>6c98e7</span>
        <p />
        &nbsp;2、2022年5月21日22点后新报备人员请使用自定义查询
        <p />
        码未设置自定义查询码人员点击报备查询即可
      </span> -->
    </div>
  </div>
</template>

<script>
import area from '@/libs/area.json'
import {
  helpUserNewQrCode,
  editQueryCode,
  editReloadQueryCode
} from '@/api/self/help'
import { Toast, Dialog } from 'vant'
export default {
  data() {
    return {
      baseImg: '',
      notShow: true,
      formData: {
        cardNo: '',
        queryCode: ''
      }
    }
  },
  mounted() {
    // this.$route.query.id
    // this.baseImg = this.$route.query.qrUrl
    // this.formData.cardNo = this.$route.query.idCard
  },
  methods: {
    onSubmit() {
      this.$refs.formDataRef.validate().then(() => {
        this.$router.push({
          // name: 'recordNewMy',
          name: 'recordNewMy-hc',
          query: {
            queryCode: this.formData.queryCode,
            cardNo: this.formData.cardNo
          }
        })
      })
    }
  }
}
</script>
<style lang="less" scoped>
.bb,
.bb::before,
.bb::after {
  // position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.bb {
  width: 450px;
  height: 450px;
  margin: auto;
  /* background: url(baseImg) no-repeat 50%/70% rgba(0, 0, 0, 0.1); */
  color: #69ca62;
  // box-shadow: inset 0 0 0 1px rgba(105, 202, 98, 0.5);
}

.bb::before,
.bb::after {
  content: '';
  z-index: -1;
  margin: -5%;
  box-shadow: inset 0 0 0 2px;
  animation: clipMe 8s linear infinite;
}

.bb::before {
  animation-delay: -4s;
}

.bb:hover::after,
.bb:hover::before {
  background-color: rgba(255, 0, 0, 0.3);
}

@keyframes clipMe {
  0%,
  100% {
    clip: rect(0px, 520px, 2px, 0px);
  }

  25% {
    clip: rect(0px, 2px, 520px, 0px);
  }

  50% {
    clip: rect(518px, 520px, 520px, 0px);
  }

  75% {
    clip: rect(0px, 5100px, 520px, 500px);
  }
}
</style>
<style lang="less" scoped>
.upload-img-5 {
  margin: 5px 0 90px 0;
}

.upload-img-1 {
  margin: 5px 0 15px 0;
}

.home {
  //   background: url('../../assets/images/smtb.jpg')no-repeat;
  background: white no-repeat;
  background-size: cover;
  min-height: 100vh;
  justify-content: center;
  align-items: center;
  height: 100%;

  img {
    width: 100%;
  }

  .dialog-container {
    height: 70vh;
    overflow-y: auto;
  }

  .get-area {
    width: 100%;
    padding: 0 0.8rem;
    font-size: 0.747rem;
    color: #fff;
    background-color: #1989fa;
    border: 0.053rem solid #1989fa;
    height: 2.347rem;
    line-height: 2.347rem;
    text-align: center;
    border-radius: 0.107rem;
    cursor: pointer;
    box-sizing: border-box;
    margin-right: 10px;
  }

  /deep/.van-field__label {
    width: 8em;
  }

  /deep/.van-field__error-message {
    text-align: right;
  }

  .title {
    // font-size: 28px;
    text-indent: 20px;
    padding: 50px 0 20px;
  }

  .container {
    width: 90%;
    height: 80vh;
    overflow-y: auto;
    border: 1px solid #adadad;
    margin: auto;

    .item {
      margin: 10px;
    }
  }
}

.up-and-down {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f1f3f4;
  height: 80px;
  color: #333;
}

// .home .blue {
//   background-color: transparent;
// }
// .home .van-cell{
//  background-color: transparent;
// }
</style>
